package com.friends.design.mode.observer;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 *
 * @Author Zhao Tianhao
 * @Description
 * @Date 2024/10/9 17:39
 */
@RestController
@RequestMapping("/observer")
public class Test {

	@Resource
	private XEventPublisher xEventPublisher;

	@GetMapping("/push")
	public void push() {
		xEventPublisher.publish("hello ");
		xEventPublisher.publishEventB(" world");
	}
}
